package com.kakavr.base.constant;

import com.kakavr.base.resource.SystemResource;

public class BaseConstant {
	private static final String BASE_URL="BASE_URL";// ip:port
	private static final String VALID_REFERER="VALID_REFERER";// 请求来源
	private static final String NO_AUTHEN_PREFIX="NO_AUTHEN_PREFIX";// 不需要登录的请求
	private static final String SQLINJECTION_KEY="SQLINJECTION_KEY";//过滤sql关键字
	private static final String ERROR_URL="ERROR_URL";//错误页面路径
	
	public static String getErrorUrl(){
		return getBaseUrl()+SystemResource.get(ERROR_URL);
	}
	
	/**
	 * 取ip:port
	 * @return
	 */
	public static String getBaseUrl(){
		return SystemResource.get(BaseConstant.BASE_URL);
	}
	
	/**
	 * 请求来源
	 * @return
	 */
	public static String getValidReferer(){
		return SystemResource.get(BaseConstant.VALID_REFERER);
	}
	/**
	 * 不需要登录的请求
	 * @return
	 */
	public static String getNoAuthenPrefix(){
		return SystemResource.get(BaseConstant.NO_AUTHEN_PREFIX);
	}
	/**
	 * 过滤sql关键字
	 * @return
	 */
	public static String getSQLInjectionKey(){
		return SystemResource.get(BaseConstant.SQLINJECTION_KEY);
	}
	
}
